home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Containers / ContainerControl / CControlSite.h < prev    next >
Encoding:
Text File  |  1996-12-15  |  1.5 KB  |  50 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //    CControlSite.h                ©1996-97 Microsoft Corporation All rights reserved.
  3. // =================================================================================
  4.  
  5. #ifndef _H_CControlSite
  6. #define _H_CControlSite
  7. #pragma once
  8.  
  9. #include "CBaseSite.h"
  10.  
  11. class CControlContainer;
  12.  
  13. class CControlSite : 
  14.     public CXSite
  15. {
  16.  
  17. public:
  18.     // *** CControlSite methods ***
  19.     CControlSite(void);
  20.     CControlSite(CControlContainer* inContainer, Uint32 inTop, Uint32 inLeft, Uint32 inHeight, Uint32 inWidth);
  21.     ~CControlSite(void);
  22.  
  23.     virtual Boolean8 Contains (Point inWhere);
  24.     
  25.    // **** IContainerSite methods ***
  26.     STDMETHOD (RequestFocus) (THIS_ Boolean inAcquire, FocusSet inFocus);
  27.     STDMETHOD (AcquireContext) (THIS_ Uint32 inContextID, DrawContext* outContext);
  28.     STDMETHOD (ReleaseContext) (THIS_ DrawContext* inContext);
  29.     STDMETHOD (SetIdleTime) (Int32 WaitTicks, Uint32 IdleRefCon);
  30.  
  31.    // **** IControl methods ***
  32.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  33.     STDMETHOD (OnContextChange) (THIS_ UInt32 inContextID, ContextCommand inCommand);
  34.     STDMETHOD (DoActivate)(THIS_ ActivateEventType inActiveET, UInt32 inContextID, PlatformEvent* inEvent) ;
  35.  
  36. private:
  37.  
  38.     // *** private methods ***
  39.     ErrorCode    EstablishContext (DrawContext* inContext, DrawContext* outContext);
  40.     ErrorCode    RestoreContext (void);
  41.  
  42.     // *** private members ***
  43.     CControlContainer*    mContainerP;
  44.     Point                mLocation;
  45.     Point                mDimensions;
  46.     DrawContext            mContext;
  47. };
  48.  
  49. #endif
  50.